//
//  WBDemoViewController.swift
//  tangbinWeibo
//
//  Created by 唐斌 on 2017/1/9.
//  Copyright © 2017年 唐斌. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController
{

    override func viewDidLoad()
    {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        
        //view.backgroundColor = UIColor.withRandom()
        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
    }

    override func didReceiveMemoryWarning()
    {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */
    
    func showNext()
    {
        let vc = WBDemoViewController();
        navigationController?.pushViewController(vc, animated: true)
    }

}


extension WBDemoViewController
{
    override func setupUI()
    {
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: .plain, target: self, action: #selector(showNext))
    }
}









